/**************************************************************
Arise Engine		InputDeviceKeyboard.h

					E-mail:	arise_engine@mail.ru

created:			10.02.2007
last changes:		21.09.2008
**************************************************************/
#pragma once

#include "InputDevice.h"


#define KEYBOARD_NUM_KEYS	 256



class InputDeviceKeyboard: public InputDevice
{
private:

	InputEvent		m_ui_event;
	unsigned short	m_buffer_id;
	unsigned char	m_keys_state[2][KEYBOARD_NUM_KEYS];	//	DirectInput keyboard state buffer 

public:
	InputDeviceKeyboard();
	virtual ~InputDeviceKeyboard();
	
	void ReadImmediateData();
	void Release();
	bool IsKeyPressed(DWORD key_code);
	void BuildEvent(INPUT_EVENT_TYPE type, int key, int scan);

	InputEvent&		GetUIEvent()	{return m_ui_event;}
};

